package com.scf.historyapproval.service.impl;

import com.scf.historyapproval.entity.History;
import com.scf.historyapproval.mapper.HistoryMapper;
import com.scf.historyapproval.service.HistoryService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author author
 * @create 2021-11-18-14:34
 */
@Service
public class HistoryServiceImpl implements HistoryService {

    @Resource
    HistoryMapper historyMapper;

    @Override
    @Transactional
    public boolean add(History history) {
        historyMapper.insert(history);
        return true;
    }

    @Override
    public List<History> get(int plid) {

        List<History> select = historyMapper.select(plid);
        return select;
    }
}
